package com.example.bbfindhouse.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.example.bbfindhouse.R;

public class kandianActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_kandian);

        // 找到底部导航栏的视图
        LinearLayout homeLayout = findViewById(R.id.bottom_bar_home);
        LinearLayout messageLayout = findViewById(R.id.bottom_bar_message);
        LinearLayout wodeLayout = findViewById(R.id.bottom_bar_wode);

        // 为首页按钮添加点击事件监听器
        homeLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 跳转到首页，假设首页为 IndexActivity
                startActivity(new Intent(kandianActivity.this, IndexActivity.class));
            }
        });

        // 为消息按钮添加点击事件监听器
        messageLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 跳转到消息页
                startActivity(new Intent(kandianActivity.this, MessageActivity.class));
            }
        });

        // 为个人中心按钮添加点击事件监听器
        wodeLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 跳转到个人中心页
                startActivity(new Intent(kandianActivity.this, wodeActivity.class));
            }
        });
    }
}